<?php

class Session {
	
	public static function get($key) {
		if (isset ( $_SESSION [SYSTEM_NAME] ['values'] [$key] ))
			return $_SESSION [SYSTEM_NAME] ['values'] [$key];
		return null;
	}
	public static function set($key, $value) {
		$_SESSION[SYSTEM_NAME]['values'][$key]=$value;
	}
	public static function auth($user, $userid, $group, $groupid) {
		$_SESSION[SYSTEM_NAME]['auth'][$user]=$user;
		$_SESSION[SYSTEM_NAME]['auth'][$userid]=$userid;
		$_SESSION[SYSTEM_NAME]['auth'][$group]=$group;
		$_SESSION[SYSTEM_NAME]['auth'][$groupid]=$groupid;
	}
	public static function isAuth() {
		if(isset($_SESSION[SYSTEM_NAME]['auth']['user'])) {
			return true;
		}
		return false;
	}
	public static function reset(){
		unset($_SESSION[SYSTEM_NAME]);
	}
}

?>
